package com.os.lambda.chapter5;

import com.os.lambda.chapter3.Artist;
import com.os.lambda.chapter3.Track;

import java.util.List;
import java.util.stream.Stream;

public class Album {

    public Album(String name) {
        this.name = name;
    }

    public Album(List<Track> trackList, String name) {
        this.trackList = trackList;
        this.name = name;
    }

    private List<Track> trackList;

    private Artist mainMusician;

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Artist getMainMusician() {
        return mainMusician;
    }

    public void setMainMusician(Artist mainMusician) {
        this.mainMusician = mainMusician;
    }

    public List<Track> getTrackList() {
        return trackList;
    }

    public Stream<Track> getTracks() {
        return trackList.stream();
    }

    public void setTrackList(List<Track> trackList) {
        this.trackList = trackList;
    }
}
